package util

import (
	"github.com/Unknwon/com"
	"github.com/gin-gonic/gin"

	"myProject/pkg/setting"
)

//获取分页数据
func getPage(c *gin.Context) int {
	result := 0
	page, _ := com.StrTo(c.Query("page")).Int()

	if page > 0 {
		return (page - 1) * setting.PageSize
	}

	return result
}
